<template>
	<view class="container">
		<view class="icon">
			<image src="../../../static/shop1.png" mode=""></image>
			<view>{{info.storeName}}</view>
			<view>-{{info.receiptsMoney||''}}</view>
		</view>
		<view class="xline"></view>
		<view class="info">
			<view>当前状态</view>
			<view>支付成功</view>
		</view>
		<view class="info">
			<view>支付时间</view>
			<view>{{info.payTime}}</view>
		</view>
		<view class="info">
			<view>商品</view>
			<view>消费[{{info.cashierOrder}}]{{info.payMethods==0?'@拉卡拉':''}}</view>
		</view>
		<view class="info" style="margin-top: 20px;">
			<view>商户全称</view>
			<view>{{info.storeName}}</view>
		</view>
		<view class="info">
			<view>收单机构</view>
			<view>{{info.payMethods==0?info.acquirer:info.storeName}}</view>
		</view>
		<view class="info"  style="margin-top: 20px;">
			<view>支付方式</view>
			<view>{{info.payMethods==0?'扫码支付':info.payMethods==1?"现金支付":info.payMethods==2?'断网支付':'其他'}}</view>
		</view>
		<!-- <view class="info">
			<view>交易单号</view>
			<view>{{info.payNumber}}</view>
		</view> -->
<!-- '		<view class="info">
			<view>商户单号</view>
			<view>XXXXXXXX</view>
		</view>' -->
	</view>
</template>

<script>
	import {getOrderDetails} from '@/apis/first.js'
	import {
		parseTime
	} from "@/utils/index.js"
	import {
		rsaDecrypt
	} from '@/utils/rsa'
	export default {
		data() {
			return {
			paymentId:"",
			info:""
			};
		},
		onLoad(options) {
			this.paymentId=options.paymentId
			this.getOrderDetails()
		},
		methods:{
		async getOrderDetails(){
				const res=await getOrderDetails({paymentId:this.paymentId})
				// let data = rsaDecrypt(res.data.data)
				// console.log(data);
				if (res.code == 200) {
					let data =res.data
					console.log(data);
					data.payTime=parseTime(data.payTime)
					this.info=data
				}
			},
		},
	}
</script>

<style lang="scss">
	page {
		background: #fff;
	}

	.container {
		.icon {
			text-align: center;
			padding-top: 20px;

			image {
				width: 60px;
				height: 60px;
			}

			>view:first-child {
				font-size: 14px;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				color: #1A1A1A;
				margin: 10px 0;
			}

			>view:last-child {
				font-size: 16px;
				font-family: PingFang SC, PingFang SC;
				font-weight: 800;
				color: #1A1A1A;
			}
		}

		.xline {
			width: calc(100% - 20px);
			height: 1px;
			background: #EEEEEE;
			margin: 30px 10px 10px 10px;
		}

		.info {
			margin-left: 30px;
			padding-top: 10px;
			display: flex;
			align-items: flex-start;
			justify-content: flex-start;
			view {
				// display: inline-block;
				font-size: 14px;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				color: #1A1A1A;
			}

			>view:first-child {
				width: 20%;
				font-size: 14px;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				color: #666666;
				margin-right: 30px;
			}
			>view:last-child{
				width: 60%;
			}
		}
	}
</style>